/**   
* @Title: LockApplication.java
* @Package me.cloud
* @Description: TODO
* @author xaoyaoyao
* @date Jan 10, 2019 1:49:51 PM
* @version V1.0   
*/
package me.cloud;

import java.io.IOException;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.ClassPathResource;

/**
 * @ClassName: LockApplication
 * @Description: TODO
 * @author xaoyaoyao
 * @date Jan 10, 2019 1:49:51 PM
 * 
 */
@SpringBootApplication
public class LockApplication {

	public static void main(String[] args) {
		SpringApplication.run(LockApplication.class, args);
	}

	@Bean
	public RedissonClient redisson() throws IOException {
		RedissonClient redisson = Redisson.create(Config.fromYAML(new ClassPathResource("redisson.yml").getInputStream()));
		return redisson;
	}

}
